﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace PortalIntranet.InternalComponents.Security
{
	public class Cryptography
	{
		public static string MD5Hash(string value)
		{
			if (string.IsNullOrEmpty(value)) return value;
			return Convert.ToBase64String(new MD5CryptoServiceProvider().ComputeHash(new UTF8Encoding().GetBytes(value)));
		}
	}
}
